package com.hshc.routeworkflow.config;

import org.activiti.spring.SpringProcessEngineConfiguration;
import org.activiti.spring.boot.ProcessEngineConfigurationConfigurer;
import org.springframework.stereotype.Component;

/**
 * 自定义配置器修改流程引擎配置类
 *
 * @author: dell
 */
@Component
public class SpringProcessEngineConfigurationConfigurer implements ProcessEngineConfigurationConfigurer {
    @Override
    public void configure(SpringProcessEngineConfiguration processEngineConfiguration) {
        /**
         * 将字体设置为"宋体", 解决流程图中文显示乱码问题
         */
        processEngineConfiguration.setActivityFontName(ActivitiConstant.ACTIVITI_FONT_NAME);
        processEngineConfiguration.setLabelFontName(ActivitiConstant.ACTIVITI_LABEL_FONT_NAME);
        processEngineConfiguration.setAnnotationFontName(ActivitiConstant.ACTIVITI_ANNOTATION_FONT_NAME);
    }
}
